/**
 * 
 */
package com.mindtree.vi.dbaccess.manager.problem;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Required;

import com.mindtree.vi.dbaccess.datatypes.problem.Problem;
import com.mindtree.vi.dbaccess.manager.TableManager;

/**
 * @author venkatesh
 * 
 */
public class ProblemTableManager implements TableManager<Problem> {

	private TableManager tableManager;

	public Problem delete(long id) {
		throw new UnsupportedOperationException("Delete not yet implemented!");
	}

	public Problem find(long id) {
		return (Problem) tableManager.find(Problem.class, id);
	}

	public Problem save(Problem id) {
		return (Problem) tableManager.save(id);
	}

	public Problem update(Problem id) {
		return (Problem) tableManager.update(id);
	}

	@Required
	public void setTableManager(TableManager tableManager) {
		this.tableManager = tableManager;
	}

	public Problem find(Class<? extends Problem> clazz, long id) {
		return (Problem) tableManager.find(Problem.class, id);
	}

	public List<Problem> findAll() {
		return tableManager.findAll();
	}

	public List<Problem> find(String query, Map<String, Object> parameterMap) {
		return null;
	}

	public List<? extends Problem> find(String query) {
		return findAll();
	}

}
